home *** CD-ROM | disk | FTP | other *** search
/ The Fatted Calf / The Fatted Calf.iso / Applications / Scheduling / Cassandra / Source / EventLog.m < prev    next >
Encoding:
Text File  |  1990-12-02  |  1.2 KB  |  65 lines

  1. //
  2. // EventLog.m
  3. // Copyright (c) 1989, 1990 by Jiro Nakamura 
  4. // All rights reserved
  5. //
  6. // Handles a log window, opens it, lets the user modify it,
  7. //  and if anything changes, lets him or her save it before
  8. // closing it.
  9. //
  10. //    by Jiro Nakamura (ac6y@vax5.cit.cornell.edu)
  11. //
  12. // RCS Information
  13. // Revision Number->    $Revision: 2.6 $
  14. // Last Revised->    $Date: 90/12/03 01:56:06 $
  15. //
  16. static char rcsid[] = "$Id: EventLog.m,v 2.6 90/12/03 01:56:06 jiro Exp Locker: jiro $";
  17.  
  18. #import "EventLog.h"
  19. #import "Global.h"
  20. #import "cass.h"    // for EVENTLOGICON
  21.  
  22. @implementation EventLog
  23.  
  24. -setGlobal:anObject
  25. {
  26.     global = anObject;
  27.     return self;
  28. }
  29.  
  30. - open:sender
  31. {
  32.     static BOOL alreadyInited = FALSE;
  33.     
  34.     if( !alreadyInited)
  35.         {
  36.         alreadyInited = TRUE;
  37.         [self placeWindow: [global eventLogFrame]];
  38.         }
  39.  
  40.     [self setTitle: "Event log"];
  41.     [self setWindowIcon: EVENTLOGICON];
  42.     [self openWith: [global eventLogFile]];
  43.     return self;
  44. }
  45.     
  46. - update
  47. {
  48.     if( [self isDocEdited])
  49.         [self save];
  50.     [self    setFilename:    [global eventLogFile]];
  51.     [super update];
  52.     if( [self isVisible])
  53.         [self selectTextEnd: self];
  54.     return self;
  55. }
  56.  
  57. - close
  58. {
  59.     [global    saveThisWindowPosition:    DEFAULTEVENTLOGFRAME : self];
  60.     [super close];
  61.     return self;
  62. }
  63.  
  64. @end
  65.